package com.tangcco.lockwell.service;

import com.tangcco.lockwell.domain.AnswerContentRecord;
import com.tangcco.lockwell.domain.ExamPaper;
import com.tangcco.lockwell.domain.dto.StatisticalStudyReportParentDto;
import com.tangcco.lockwell.domain.dto.english.AnswerEnglishKeyValueDto;
import com.tangcco.lockwell.domain.dto.politics.AnswerPoliticsChildDto;

import java.math.BigDecimal;
import java.util.List;


/**
 * 用户答题记录
 * @author yanxinping
 * @version 1.0
 * @description: TODO
 * @date 2024/12/23 9:49
 */
public interface AnswerContentRecordService {
    int insert(AnswerContentRecord record);

    int update(AnswerContentRecord record);

    void insertOrUpdateForPolitics(Boolean isTest,BigDecimal score, List<AnswerPoliticsChildDto> list, ExamPaper examPaper, Integer userId, Long totalTimeSpent,List<AnswerPoliticsChildDto> thisTimeData);

    void insertOrUpdateForEnglish(Boolean isTest,List<AnswerEnglishKeyValueDto> list, ExamPaper examPaper, Integer userId,Integer questionId,Long totalTimeSpent);

    List<AnswerContentRecord> selectByExamPaperIdAndUserId(Integer type,Integer examPaperId, Integer userId);

    List<AnswerContentRecord> selectByExamPaperIdAndUserIdAndQuestionId(Integer type,Integer examPaperId, Integer userId,Integer questionId);

    /**
     * 学习报告
     * @return
     */
    StatisticalStudyReportParentDto statisticalStudyReport(Integer week,Integer userId);

    /**
     * 计算英语成绩
     * @param examPaperId
     * @param totalTimeSpent
     */
    void calcutateEnglishScore(Integer examPaperId,Long totalTimeSpent);
}
